<?php $this->load->view('common/header');?>

<body>
<?php $this->load->view('common/user_center');?>
<div class="main_box">
    <?php $this->load->view('common/menu');?>
    <div class="right_box f_r">
    	<div class="title">
        	<span class="f_l">我的订单</span>
        </div>
        <div class="my_order">
            <?php if($orders){ ?>
            <?php foreach ($orders as $key => $val) {?>
        	<table>
            	<tr>
                	<td colspan="7">
                    	<div class="order_tit">
                            <span class="f_l">订单号：<?php echo $val['order_no'];?>&nbsp;&nbsp;&nbsp;&nbsp;下单时间：<?php echo date("Y-m-d H:i:s",$val['order_add_time']);?></span>
                            <?php if($val['order_status'] == 0){ ?>
                                <span class="f_r b">未支付</span>
                            <?php }?>
                            <?php if($val['order_status'] == 1){ ?>
                                <span class="f_r b">待送货</span>
                            <?php }?>
                            <?php if($val['order_status'] == 2){ ?>
                                <span class="f_r a">待收货</span>
                            <?php }?>
                            <?php if($val['order_status'] == 3){ ?>
                                <span class="f_r c">已完成</span>
                            <?php }?>

                        </div>
                    </td>
                </tr>
            	<tr>
                	<th>产品名称</th>
                    <th class="w140">规格</th>
                    <th class="w140">单价</th>
                    <th>数量</th>
                    <th>金额</th>
                    <th>制作工艺</th>
                    <th>料号</th>
                </tr>
                <?php if($val['tmp_list']){ ?>
                <?php foreach ($val['tmp_list'] as $key2 => $val2) {?>
            	<tr>
                	<td>【<?php echo $val2['category_name'];?>】<?php echo $val2['good_title'];?></td>
                    <td class="w140"><?php echo $val2['good_memo'];?></td>
                    <td class="w140"><?php echo $val2['per_good_price'];?></td>
                    <td><?php echo $val2['good_mum'];?></td>
                    <td><?php echo $val2['good_price'];?></td>
                    <td><?php echo $val2['good_content'];?></td>
                    <td><?php echo $val2['good_part_number'];?></td>
                </tr>
                <?php } ?>
                <?php } ?>
            	<tr>
                	<td colspan="7">
                    	<div class="beizhu"><?php echo $val['remark'];?></div>
                    	<div class="money">
                        	<span>开票：<?php if($val['is_kaipiao'] == 1){ ?>是<?php }else{?>否<?php }?>&nbsp;&nbsp;&nbsp;&nbsp;送货：<?php if($val['is_songhuo'] == 1){ ?>是<?php }else{?>否<?php }?></span>
                            <p>订单总金额：<i>￥<?php echo $val['order_price'];?></i></p>
                            <em><?php echo $val['notice'];?></em>
                        </div>
                    </td>
                </tr>
            </table>
            <?php } ?>
            <?php } ?>
        </div>
    </div>
</div>
<!--]] user -->
<!-- coypright [[-->
<?php $this->load->view('common/footer');?>
<!--]] coypright -->
</body>
</html>
